cmake_minimum_required(VERSION 3.10.0)
project(cpp VERSION 0.1.0 LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_package(CURL REQUIRED)
find_package(OpenSSL REQUIRED)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

add_compile_options(-O3)
find_package(Qt5 COMPONENTS Widgets Core Gui REQUIRED)



include_directories(
  include
  
  ${Qt5Widgets_INCLUDE_DIRS}
  ${Qt5Core_INCLUDE_DIRS}
  ${Qt5Gui_INCLUDE_DIRS}
  )
  
  
add_executable(cpp 
  ./src/main.cpp
  ./src/initWindow.cpp
  ./src/UserChatWindow.cpp
  ./src/UserRegister.cpp
  ./src/LoginWindow.cpp
  ./src/RegisterWindow.cpp
  ./src/markdownTohtml.cpp
  ./src/AdminGUI.cpp
  ./src/AdminLogin.cpp
  include/initWindow.hpp
  include/UserChatWindow.hpp
  include/UsersRegister.hpp
  include/LoginWindow.hpp
  include/RegisterWindow.hpp
  include/AdminGUI.hpp
  include/AdminLogin.hpp
  resources.qrc)

  
target_link_libraries(${PROJECT_NAME}
  Qt5::Widgets
  Qt5::Core
  Qt5::Gui
  CURL::libcurl
  OpenSSL::SSL
  OpenSSL::Crypto
  )



